import axios from '@/libs/api.request'
/**
 * 获取单条记录-<%=table.remark%><% var tableName = table.tableCameName.replace(moduleName,"");tableName=tableName.replace(tableName[0],tableName[0].toLowerCase());%>
 */
export const get = (data) => {
  return axios.request({
    url: '<%=moduleName%>/<%=tableName%>/get',
    method: 'get',
    data: data
  })
}
/**
 * 分页查询-<%=table.remark%>
 */
export const listByPage = (data) => {
  return axios.request({
    url: '<%=moduleName%>/<%=tableName%>/list',
    method: 'post',
    data: data
  })
}
/**
 * 保存<%=table.remark%>
 */
export const save = (data) => {
  return axios.request({
    url: '<%=moduleName%>/<%=tableName%>/save',
    method: 'post',
    data: data
  })
}

/**
 * 更新<%=table.remark%>
 */
export const update = (data) => {
  return axios.request({
    url: '<%=moduleName%>/<%=tableName%>/update',
    method: 'post',
    data: data
  })
}

/**
 * 删除<%=table.remark%>--不可恢复
 */
export const deleteBatch = (data) => {
  return axios.request({
    url: '<%=moduleName%>/<%=tableName%>/delete',
    method: 'post',
    data: { ids: data }
  })
}
/**
 * 删除<%=table.remark%>--可恢复
 */
export const remove = (data) => {
  return axios.request({
    url: '<%=moduleName%>/<%=tableName%>/remove',
    method: 'post',
    data: { ids: data }
  })
}
/**
 * 恢复删除<%=table.remark%>
 */
export const restore = (data) => {
  return axios.request({
    url: '<%=moduleName%>/<%=tableName%>/restore',
    method: 'post',
    data: { ids: data }
  })
}
